package org.test.test1.dao.pojo;



import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Employee {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String password;
    private String email;
    private Integer age;
    private Boolean admin;
    //@TableField(exist = false) //表中没有该字段
    //private Integer sex;

    //数据库中字段为dept_id，mybatis-plus映射规则为驼峰，所以要这样命名，否早查询结果为null
    private Long deptId;

}
